package com.grts.mall.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.grts.mall.common.CommonResult;
import com.grts.mall.pojo.User;
import com.grts.mall.service.UserService;

@RestController
public class RegisterController {

	@Autowired
	private UserService userService;
	
	@RequestMapping("/register")
	public CommonResult register(@RequestBody User user) {
		CommonResult res = this.userService.register(user);
		return res;	
	}
	
}
